<template>
    <div>
<h2>库存清单

</h2>
<el-button plain @click="Derive()">
    导出
  </el-button>
  
  <el-form :inline="true">  
      <el-form-item label="仓库名称" prop="warehouseName" style="width: 200px;">
            <el-input v-model="p.warehouseName" />
          </el-form-item>
          <!-- <el-form-item label="库存名称" prop="inventoryName" style="width: 200px;">
            <el-input v-model="p.inventoryName" />
          </el-form-item> -->
        </el-form>
          <el-button plain @click="getMenus()">
    查询 
  </el-button>
<el-table :data="tableData" style="width: 100%">
    <el-table-column prop="inboundTime" label="入库日期" width="180">
       <template #default="scope">
         {{ scope.row.inboundTime.substring(0, 10) }}
       </template>
     </el-table-column>
   
     <el-table-column prop="outboundTime" label="出库时间" width="180">
       <template #default="scope">
         {{ scope.row.outboundTime.substring(0, 10) }}
       </template>
     </el-table-column>

       <el-table-column prop="warehouseName" label="仓库名称"  />
       <el-table-column prop="inventoryName" label="库存名称"  />
       <el-table-column prop="inventoryNumber" label="库存编号"  />
       <el-table-column  prop="inventoryNum" label="库存数量" />

     
       <el-table-column prop="inventSpecifications" label="库存规格"  />
       <el-table-column prop="shifou" label="是否"  />
   


      
     </el-table>
    </div>
</template>

<script setup lang="ts">
import axios from "axios";
import { ElMessage, ElMessageBox } from "element-plus";
import { onMounted, reactive, ref, watch } from "vue";
const apiUrl = import.meta.env.VITE_APP_API_URL;
const p=reactive({
    warehouseName:"",
   
})
const tableData = ref([]);
onMounted(() => {
  getMenus();
});
const getMenus=()=>{
axios({
    url: apiUrl+"/T5/Inventorylists/GetInventorylists",
    method:'get',
    params:p

})
.then((res)=>{
    tableData.value=res.data.data
    console.log(tableData.value)
})
.catch((err)=>{
    console.log(err)
})
}
const Derive = () => {
  window.location.href = apiUrl+"/T5/Inventorylists/ExeclCustomer";
};
</script>

<style scoped>

</style>